package com.sunjob.common.domain.system;

import com.alibaba.fastjson.JSON;
import com.sunjob.common.mroAnno.LogModuleType;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Map;

/**
 * Created by IntelliJ IDEA.
 *
 * @Author : Wangzurong
 * @create 2022-08-02 8:53
 * 业务日志类
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ToString
public class SysBusinessLog implements Serializable {
    public enum BusinessStatus {
        SUCCESS(0), FAIL(1), UNKNOWN(2);
        private int value;

        BusinessStatus(int value) {
            this.value = value;
        }

        public int getValue() {
            return value;
        }
    }
    // 筛选字段
    private Integer st;
    // 业务日志id
    private Long businessLogId;
    // 业务日志状态
    private BusinessStatus businessLogStatus;
    // 业务耗时
    private Long businessLogCost;
    // 筛选字段
    private String lm;
    // 业务日志模块
    private LogModuleType businessLogModule;
    // 业务操作人id
    private Long businessLogUserId;
    // 业务日志创建时间
    private LocalDateTime businessLogTime;
    private SysBusinessLogContent businessLogContent;
    // 过滤参数
    private Map<String,Object> params;
}
